#ifndef __FRAM_H
#define __FRAM_H

#include "at32f413_board.h"
#include "i2c_application.h"
#include "i2c_user.h"

#define FRAM_I2C_ADDR 0xA0

#define FRAM_ADDR_INITED 0x00
#define FRAM_ADDR_BOOTCNT 0x01
#define FRAM_ADDR_SETVELOCITY 0X03

void fram_init_param(void);
void fram_init(void);
void fram_read_reg(uint8_t addr, uint8_t cnt, uint8_t *val);
void fram_write_reg(uint8_t addr, uint8_t cnt, uint8_t* val);

#endif // __FRAM_H